#回调函数
def func(a,b,c):
    print(a,b)
    result=c()
    print(result)
func(5,6,lambda:3)

#闭包
def outer(a):
    def inner():
        num=a+1
        print(num)
    return inner
func=outer(10)
func()

#装饰器
def outer(func):
    def inner():
        print('chanyeol Rapper!')
        func()
        print('chanbaek is real!!')
    return inner

#正常方法
# def Star():
#     print('baekhyun Singer')
#
# Star=outer(Star)
# Star() 

#装饰器语法
@outer
def Star():
    print('baekhyun Singer!')
Star()